//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.aidong.dao.wills;

import com.aidong.dao.base.OrderSet;
import com.aidong.dao.wills.BaseDao;
import com.aidong.model.wills.WorkflowType;

import java.util.List;

import org.springframework.stereotype.Repository;

@Repository
public class WorkflowTypeDao extends BaseDao<WorkflowType, String> {
    public WorkflowTypeDao() {
    }

    public List<WorkflowType> getValidTypeList() {
        return this.queryList("status=1", (Object[]) null, (new OrderSet()).asc("category").asc("code"), -1);
    }

    public boolean updateStatus(String code, int status) {
        String hql = "update WorkflowType set status=:p1 where code=:p2";
        return this.updateByHql(hql, new Object[]{Integer.valueOf(status), code}) > 0;
    }
}
